${page.setLayoutName("blank")}
<div id="g-cfg" data-fo-totop="0"/>
<form id="alipayform" action="https://mapi.alipay.com/gateway.do?_input_charset=utf-8" method="post">
	 <input name="payment_type" id="payment_type" type="hidden" value="${param.payment_type}"/>
	 <input name="out_trade_no" id="out_trade_no" type="hidden" value="${param.out_trade_no}"/>
	<input name="total_fee" id="total_fee" type="hidden" value="${param.total_fee}"/>
	<input name="subject" id="subject" type="hidden" value="${param.subject}" />
	<input name="body" id="body" type="hidden" value="${param.body}"/>
	 <input name="paymethod" id="paymethod" type="hidden" value="${param.paymethod}"/>
	<input name="show_url" id="show_url" type="hidden" value="${param.show_url}"/>
	<input name="defaultbank" id="defaultbank" type="hidden" value="${param.defaultbank}"/>
	<input name="anti_phishing_key" id="anti_phishing_key" type="hidden" value="${param.anti_phishing_key}"/>
	<input name="exter_invoke_ip" id="exter_invoke_ip" type="hidden" value="${param.exter_invoke_ip}"/>
	<input name="extra_common_param" id="extra_common_param" type="hidden" value="${param.extra_common_param}"/>
	<input name="buyer_email" id="buyer_email" type="hidden" value="${param.buyer_email}"/>
	<input name="royalty_type" id="royalty_type" type="hidden" value="${param.royalty_type}"/>
	<input name="royalty_parameters" id="royalty_parameters" type="hidden" value="${param.royalty_parameters}"/> 
	<input name="service" id="service" type="hidden" value="${param.service}"/>
	<input name="partner" id="partner" type="hidden" value="${param.partner}"/>
	<input name="return_url" id="return_url" type="hidden" value="${param.return_url}"/>
	<input name="notify_url" id="notify_url" type="hidden" value="${param.notify_url}"/>
	<input name="error_notify_url" id="error_notify_url" type="hidden" value="${param.error_notify_url}"/>
	<input name="seller_email" id="seller_email" type="hidden" value="${param.seller_email}"/>
	<input name="_input_charset" id="_input_charset" type="hidden" value="${param._input_charset}"/>
	<input name="key" id="key" type="hidden" value="${param.key}"/>
	<input name="sign_type" id="sign_type" type="hidden" value="${param.sign_type}"/>
	<input name="sign" id="sign" type="hidden" value="${param.sign}"/>
	<input name="it_b_pay" id="it_b_pay" type="hidden" value="${param.it_b_pay}"/>
	<input name="default_login" id="default_login" type="hidden" value="${param.default_login}"/>
</form>


<script type="text/javascript">
$GF.push(function(){
	
	function CheckForm(subject,desc){
		if (subject.length == 0) {
			alert("请输入商品名称.");
			return false;
		}
		
	    if(getStrLength(desc) > 200){
	        alert("备注过长！请在100个汉字以内");
	        return false;
	    }
	    if(getStrLength(subject) > 256){
	        alert("标题过长！请在128个汉字以内");
	        return false;
	    }
	
	    desc = desc.replace(/\n/g,'');
	    return true;
	} 
	
	function getStrLength(value){
	    return value.replace(/[^\x00-\xFF]/g,'**').length;
	}

	  
	if(CheckForm($("#subject").val(),$("#body").val())){
		$("#alipayform").submit();
	}  

}) 

</script>
